package com.llamarun;

import android.graphics.BitmapFactory;
import android.view.View;

public class Sheep extends Projectible {
	private boolean improved = false;
	private int i = 0;
	
	public Sheep (View view)
	{
		this.setBitmap(BitmapFactory.decodeResource(view.getResources(), R.drawable.sheep2));
	}
	
	public void improve()
	{
		improved = true;
	}
	
	public void unimprove(){
		improved = false;
	}
	
	public void fly()
	{
		if (!improved)
		{
			this.setX(this.getX()+speed);
		}
		else
		{
			this.setX(this.getX()+speed);
			this.setY((int)(this.getY()+50*Math.sin(i)));
			i++;
		}
	}
}
